<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Admin/UserBet/index')}">竞猜统计</a></li>
		</ul>
		<form class="well form-search" id="query_form" method="post" action="{:U('Admin/UserBet/index')}">
			赛事名称： 
			<input type="text" name="name" style="width: 120px;" value="{$formParam.name}" placeholder="赛事直播名称...">
			
			<input type="button" name="query_form_btn" id="queryBtn" data-action="{:U('Admin/UserBet/index')}" class="btn btn-primary" value="查询" />
		</form>
		<form class="js-ajax-form" action="" method="post">
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>赛事名称</th>
					<th>A队名称</th>
					<th>A队投注额</th>
					<th>A队参与数</th>
					<th>B队名称</th>
					<th>B队投注额</th>
					<th>B队参与数</th>
					<th>赛事结果</th>
					<th>竞猜支出</th>
					<th>竞猜收入</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="data" item="vo">
				<tr>
					<td>{$vo.name}</td>
					<td>{$vo.teamAName}</td>
					<td>{$vo.teamAAmount}</td>
					<td>{$vo.teamANum}</td>
					<td>{$vo.teamBName}</td>
					<td>{$vo.teamBAmount}</td>
					<td>{$vo.teamBNum}</td>
					<td>
					    <if condition="$vo.vsResult eq 1">
						   {$vo.teamAName}(A队)胜
						</if>
						<if condition="$vo.vsResult eq 2">
						   {$vo.teamBName}(B队)胜
						</if>
						<if condition="$vo.vsResult eq 3">
						   平局
						</if>
					</td>
					<td>{$vo.earnAmount}</td>
					<td>{$vo.amount}</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		</form>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
	$(document).ready(function(){
		$('input[name="query_form_btn"]').click(function(){
			 $('#query_form').attr('action', $(this).attr('data-action'));
			 $('#query_form').submit();
		});
		$('#typeId').val({$formParam.typeId});
	});
	</script>
</body>
</html>